﻿@namespace BlazorStrap.Extensions.BSDataTable
@typeparam TItem
@inherits DataComponentBase<TItem>


@if (IsLoading)
{
    @LoadingTemplate
}
else
{
    @if (HasNoData)
    {
        @NoDataTemplate
    }
    else
    {
        <BSCarousel NumberOfItems="_numberOfItems" Class="@Class" Interval="@Interval" Keyboard="@Keyboard" Fade="@Fade" Ride="@Ride"
                    Touch="@Touch" UnknownParameters="@UnknownParameters" Wrap="@Wrap">
            @if (HasIndicators)
            {
                <BSCarouselIndicators NumberOfItems="_numberOfItems" />
            }

            <div class="carousel-inner">
                @foreach (var item in Items)
                {
                    @ItemTemplate(item)
                }
            </div>
            @if (HasControls)
            {
                <BSCarouselControl CarouselDirection="CarouselDirection.Previous" NumberOfItems="@_numberOfItems" />
                <BSCarouselControl CarouselDirection="CarouselDirection.Next" NumberOfItems="@_numberOfItems" />
            }
        </BSCarousel>
    }
}